/*
 * MusicLabs, Copyright (C) 2008-2009 Felippe Ragghianti
 * http://code.google.com/p/musiclabs
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 */

package br.com.music;

// TODO: create class Note { Pitch, Duration, Pressure }
// TODO: create class Pressure.

/**
 * This class represents a Note Pitch.
 *
 * @version $LastChangedRevision$
 */
public enum Pitch {

    /*
     * TODO: add param Frequency to constructor.
     * http://en.wikipedia.org/wiki/Note#Note_frequency_.28hertz.29
     *
     * TODO FIXME we cannot represent bemols here. that doesn't sound good..
     */

    DO   ("C")   ,
    DOS  ("C#")  ,
    RE   ("D")   ,
    RES  ("D#")  ,
    MI   ("E")   ,
    FA   ("F")   ,
    FAS  ("F#")  ,
    SOL  ("G")   ,
    SOLS ("G#")  ,
    LA   ("A")   ,
    LAS  ("A#")  ,
    SI   ("B");

    /**
     * A note glyph is composed by a letter, which represents the tone, plus an
     * optional symbol representing the accidentals.
     */
    private String glyph;

    /**
     * Class constructor.
     *
     * @arg glyph
     */
    private Pitch(String glyph) {
        this.glyph = glyph;
    }

    /**
     * Convert {@link Note} to String.
     *
     * @return Return note's glyph (e.g.: C# for Do sharp, etc).
     */
    @Override
    public String toString() {
        return this.glyph;
    }

}
